import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    loginUser: {
      name: "Hydra",
      age: 35,
      token: "123456"
    }
  },
  getters: {
    getUserName(state){
      return state.loginUser.name;
    }
  },
  mutations: {
    setLoginUserName(state,payload) {
      state.loginUser.name = payload;
    }
  },
  actions: {
  },
  modules: {
  }
})
